/*
package com.jymj.controller;

import com.jymj.common.annotation.SysLog;
import com.jymj.common.validator.ValidatorUtils;
import com.jymj.entity.PjProjEntity;
import com.jymj.service.PjProjService;
import com.jymj.utils.PageUtils;
import com.jymj.utils.Query;
import com.jymj.utils.R;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

*/
/**
 * Created by dl on 2017/7/21.
 *//*

@RestController
@RequestMapping("/sys/proj")
public class PjProjController extends AbstractController {

    @Autowired
    private PjProjService pjProjService;

    */
/**
     * 所有工程列表
     *
     * @param params
     * @return
     *//*

    @RequestMapping("/list")
    @RequiresPermissions("sys:proj:list")
    public R list(@RequestParam Map<String, Object> params) {
        try {
            //查询列表数据
            Query query = new Query(params);
            List<PjProjEntity> baseList = pjProjService.queryList(query);
            int total = pjProjService.queryTotal(query);
            PageUtils pageUtil = new PageUtils(baseList, total, query.getLimit(), query.getPage());
            return R.ok().put("page", pageUtil);
        } catch (Exception ex) {
            logger.error(ex.getMessage(), ex);
            return R.error(ex.getMessage());
        }
    }

    */
/**
     * 项目基本情况
     *
     * @param projId
     * @return
     *//*

    @RequestMapping("/info/{projId}")
    @RequiresPermissions("sys:proj:info")
    public R info(@PathVariable("projId") Integer projId) {
        PjProjEntity proj = pjProjService.queryObject(projId);
        return R.ok().put("proj", proj);
    }

    */
/**
     * 保存基础信息表
     *
     * @param proj
     * @return
     *//*

    @SysLog("添加工程信息")
    @RequestMapping("/save")
    @RequiresPermissions("sys:proj:save")
    public R save(@RequestBody PjProjEntity proj) {
        ValidatorUtils.validateEntity(proj);
        proj.setCreatePsn(Integer.parseInt(getUserId().toString()));
        proj.setEnable(true);
        pjProjService.save(proj);
        return R.ok();
    }

    */
/**
     * 修改基础信息表
     *
     * @param proj
     * @return
     *//*

    @SysLog("修改工程信息")
    @RequestMapping("/update")
    @RequiresPermissions("sys:proj:update")
    public R update(@RequestBody PjProjEntity proj) {
        ValidatorUtils.validateEntity(proj);
        pjProjService.update(proj);
        return R.ok();
    }

    */
/**
     * 删除工程列表项
     *
     * @param id
     * @return
     *//*

    @SysLog("删除工程列表项")
    @RequestMapping("/delete")
    @RequiresPermissions("sys:proj:delete")
    public R delete(@RequestBody Integer id) {
        pjProjService.delete(id);
        return R.ok();
    }

    */
/**
     * 删除工程列表项
     *
     * @param projIds
     * @return
     *//*

    @SysLog("删除工程列表项")
    @RequestMapping("/deleteBatch")
    @RequiresPermissions("sys:proj:delete")
    public R delete(@RequestBody Integer[] projIds) {
        pjProjService.deleteBatch(projIds);
        return R.ok();
    }

    @RequestMapping("/perms")
    @RequiresPermissions("sys:proj:perms")
    public R perms() {
        //查询列表数据
        List<PjProjEntity> projList = pjProjService.queryList(new HashMap<>());
        return R.ok().put("projList", projList);
    }

    @RequestMapping("/listByUser/{userId}")
    @ResponseBody
    public R list(@PathVariable("userId") Long userId) {
        List prjs = pjProjService.queryList(getUserId());
        return R.ok().put("projs", prjs);
    }

    @RequestMapping("/projSummary/{userId}")
    @ResponseBody
    public R projSummary(@PathVariable("userId") Long userId) {
        List<PjProjEntity> prjs = pjProjService.projSummary(getUserId());
        return R.ok().put("data", prjs);
    }

}
*/
